import { ref, onMounted } from 'vue'

export const numFn = () => {
  const num = ref(0)
  const add = () => {
    num.value++
  }
  onMounted(() => {
    console.log('生命周期', num.value)
  })
  return { num, add }
}

export const countFn = () => {
  const count = ref(999)
  const countAdd = () => {
    count.value++
  }
  onMounted(() => {
    console.log('生命周期', count.value)
  })
  return { count, countAdd }
}
